<?php 
if(!function_exists('isadmin')){
	function isAdmin(){
		$isAdmin = false;
		// get the superobject
		$CI =& get_instance();
		
		// call the session library
		$arr = $CI->session->all_userdata();
		
		if ( $arr['level'] == "2")
		{
			$isAdmin = true;
		}
		return $isAdmin;
	}
}
?>